// 统一请求路径前缀在libs/axios.js中修改
import {
  getRequest,
  putRequest,
  postRequest,
  uploadFile,
  managerUrl
} from "@/libs/axios";

// 获取会员分页列表
export const getMemberPage = (params) => {
  return getRequest(`${managerUrl}/manager/passport/member`, params);
};

// 重置密码
export const getResetPwd = (ids) => {
  return getRequest(`${managerUrl}/manager/passport/member/resetPassword/${ids}`);
};

// 新增会员
export const postMemberAdd = (params) => {
  return postRequest(`${managerUrl}/manager/passport/member`, params);
};

// 修改会员
export const putMemberUpdate = (params) => {
  return putRequest(`${managerUrl}/manager/passport/member`, params);
};

// 上传头像
export const postUpload = (params) => {
  let headers = { 'Content-Type': 'multipart/form-data' };
  return postRequest(uploadFile, params, headers);
};

// 禁-启 用会员状态
export const putMemberStatus = (params) => {
  return putRequest(`${managerUrl}/manager/passport/member/updateMemberStatus`, params);
};